<div class="modal-header">
    <h3 class="modal-title">链接</h3>
</div>
<div class="modal-body">
    <form>
        <div class="form-group" id="link-url-wrap" ng-class="{true: 'has-success', false: 'has-error'}[urlPassed]">
            <label for="link-url">链接地址：</label>
            <input type="text"
                   class="form-control"
                   ng-model="url"
                   ng-blur="urlPassed = R_URL.test(url)"
                   ng-focus="this.value = url"
                   ng-keydown="shortCut($event)"
                   id="link-url"
                   placeholder="必填：以 http(s):// 或 ftp:// 开头">
        </div>
        <div class="form-group" ng-class="{'has-success' : titlePassed}">
            <label for="link-title">提示文本：</label>
            <input type="text" class="form-control" ng-model="title" ng-blur="titlePassed = true" id="link-title" placeholder="选填：鼠标在链接上悬停时提示的文本">
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-primary" ng-click="ok()">确定</button>
    <button class="btn btn-warning" ng-click="cancel()">取消</button>
</div>